package study.week03.gateway_final.filter;

import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.FullHttpRequest;
import io.netty.handler.codec.http.FullHttpResponse;

public interface CustomHttpFilter {

    /**
     * 请求时的过滤器,返回false就直接结束这次http请求
     * @param fullRequest
     * @param ctx
     * @return 返回false就直接结束这次http请求
     */
    boolean inbound(FullHttpRequest fullRequest, ChannelHandlerContext ctx);

    /**
     * 请求时的过滤器,返回false就直接结束这次http请求
     * @param response
     * @return 返回false就直接结束这次http请求
     */
    boolean outbound(FullHttpResponse response);

}
